package com.vhall.component.entity.exam.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author guoxin.wang
 * @date 2021-07-19 14:00
 */
@Data
public class ExamGetNumReqVo implements Serializable {

    private static final long serialVersionUID = -4479900192057100246L;

    @NotBlank(message = "room_id参数错误")
    @ParamName("room_id")
    private String roomId;

    @NotBlank(message = "account_id参数错误")
    @ParamName(value = "account_id")
    private String accountId;

    /**
     * 2019-08-01
     */
    @NotBlank(message = "start_time参数错误")
    @ParamName(value = "start_time")
    @Pattern(regexp = "^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))",
            message = "时间格式应为：yyyy-MM-dd")
    private String beginDate;

    @NotBlank(message = "end_time参数错误")
    @ParamName(value = "end_time")
    @Pattern(regexp = "^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))",
            message = "时间格式应为：yyyy-MM-dd")
    private String endDate;

}
